import request from "@/utils/request";

// 物流-列表
export const countryList = (data) =>
  request({
    url: `/finance/tc-bill/index`,
    method: "post",
    data,
  });

// 国家管理-详情
export const countryDetail = (data) =>
  request({
    url: `/finance/initial-bills/detail`,
    method: "post",
    data,
  });

// 头程对账-列表-单个详情
export const billsDetail = (params) =>
  request({
    url: `/finance/tc-bill/detail`,
    method: "get",
    params,
  });

// 国家管理-创建
export const createBills = (data) =>
  request({
    url: `/finance/tc-bill/create`,
    method: "post",
    data,
  });

// 国家管理-编辑
export const updateBills = (data) =>
  request({
    url: `/finance/tc-bill/update`,
    method: "post",
    data,
  });

// 国家管理-删除
export const deleteCountry = (data) =>
  request({
    url: `/base/country/delete`,
    method: "post",
    data,
  });

// 国家管理-启用禁用
export const statusCountry = (data) =>
  request({
    url: `/finance/initial-bills/status`,
    method: "post",
    data,
  });

// 国家管理-分配国家到区域
export const assignCountry = (data) =>
  request({
    url: `/base/country/assign`,
    method: "post",
    data,
  });

// 邮编管理-列表
export const zipCodeList = (data) =>
  request({
    url: `/finance/tc-bill/index-finance`,
    method: "post",
    data,
  });

// 邮编管理-创建
export const createZipCode = (data) =>
  request({
    url: `/base/zip-code/create`,
    method: "post",
    data,
  });

// 邮编管理-编辑
export const updateZipCode = (data) =>
  request({
    url: `/base/zip-code/update`,
    method: "post",
    data,
  });

// 邮编管理-详情
export const zipCodeDetail = (params) =>
  request({
    url: `/base/zip-code/detail`,
    method: "get",
    params,
  });

// 邮编管理-启用禁用
export const statusZipCode = (data) =>
  request({
    url: `/base/zip-code/status`,
    method: "post",
    data,
  });

// 邮编管理-删除
export const deleteZipCode = (data) =>
  request({
    url: `/base/zip-code/delete`,
    method: "post",
    data,
  });

// 头程对账-财务审核
export const auditSubmit = (data) =>
  request({
    url: `/finance/tc-bill/audit`,
    method: "post",
    data,
  });

// 警告项配置-获取
export const warningConfig = (params) =>
  request({
    url: `/finance/tc-bill-setting/get-warning`,
    method: "GET",
    params,
  });
// 警告项配置-设置
export const setWarningConfig = (data) =>
  request({
    url: `/finance/tc-bill-setting/set-warning`,
    method: "POST",
    data,
  });
// 审核规则-查询
export const auditList = (data) =>
  request({
    url: `/finance/initial-audit/index`,
    method: "post",
    data,
  });

// 审核规则-新增
export const createAudit = (data) =>
  request({
    url: `/finance/initial-audit/create`,
    method: "post",
    data,
  });

// 审核规则-修改
export const updateAudit = (data) =>
  request({
    url: `/finance/initial-audit/update`,
    method: "post",
    data,
  });

// 审核规则-详情
export const auditDetail = (params) =>
  request({
    url: `/finance/initial-audit/detail`,
    method: "get",
    params,
  });

// 审核规则-启用/禁用
export const statusAudit = (data) =>
  request({
    url: `/finance/initial-audit/status`,
    method: "post",
    data,
  });

// 审核规则-删除
export const deleteAudit = (data) =>
  request({
    url: `/finance/initial-audit/delete`,
    method: "post",
    data,
  });

// 提交
export const submitBills = (data) =>
  request({
    url: `/finance/tc-bill/submit`,
    method: "post",
    data,
  });
// 作废
export const cancelBills = (data) =>
  request({
    url: `/finance/tc-bill/cancel`,
    method: "post",
    data,
  });
//申请付款
export const applyPay = (data) =>
  request({
    url: `/finance/tc-bill/apply-payment`,
    method: "post",
    data,
  });

//下载导入结果
export const downImportResult = (data) =>
  request({
    url: `/finance/tc-bill/down-import-result`,
    method: "post",
    data,
  });

//推送费用到头程系统
export const tcBillPush = (data) =>
  request({
    url: `/finance/tc-bill/push-fee-to-tc-sys`,
    method: "post",
    data,
  });
//反审
export const reverseApproved = (data) =>
  request({
    url: `/finance/tc-bill/reverse-approved`,
    method: "post",
    data,
  });
//账单差异列表
export const tcBillDiff = (data) =>
  request({
    url: `/finance/tc-bill/index-diff`,
    method: "post",
    data,
  });
//获取物流商数据
export const logisticsList = (data) =>
  request({
    url: `/opts/logistics`,
    method: "post",
    data,
  });
//获取物流商对应的收款单位数据
export const logisticsFinance = (data) =>
  request({
    url: `/opts/logistics_finance`,
    method: "post",
    data,
  });
//物流商账期配置
export const logisticsBpConfig = (data) =>
  request({
    url: `/opts/logistics-bp-config`,
    method: "post",
    data,
  });
//获取申请付款详情
export const getApplyPaymentGd = (data) =>
  request({
    url: `/finance/tc-bill/apply-payment-gd`,
    method: "post",
    data,
  });
  //finance/tc-bill/apply-payment
  export const saveApplyPayment = (data) =>
  request({
    url: `/finance/tc-bill/apply-payment`,
    method: "post",
    data,
  });